package com.baiyi.cloud.platform.eureka;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.turbine.EnableTurbine;

/** 
 * 
 * @ClassName: EurekaServerApp
 * @Description: eureka高可用三台机器
 * @author huwenfeng
 * @date 2019年1月7日
 */
@EnableEurekaServer
@SpringCloudApplication
@EnableHystrixDashboard
@EnableTurbine
public class EurekaServerApp {

	public static void main(String[] args) {

//    	1本地启动采用此方法加载profiles文件
    	/*ConfigurableApplicationContext context = */
		new SpringApplicationBuilder(EurekaServerApp.class).
				profiles("slave0").run(args);
//		SpringApplication.run(EurekaServerApp.class, args);
//    	2服务器采用此方法 java -jar   --spring.profiles.active=slave0;
//    	 SpringApplication.run(EurekaServerApp.class, args);

    	
    	
	}

}